home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2001 / MacHack 2001.toast / pc / The Hacks / Palm Finder 2 / Src / Panes / pane.h < prev    next >
Encoding:
Text File  |  2001-06-23  |  1008 b   |  42 lines

  1. // pane.h
  2.  
  3. // pane base class, for any UI item which does not contain other items
  4. #pragma once
  5. #define PILOT_PRECOMPILED_HEADERS_OFF
  6. #include <Pilot.h>
  7.  
  8. class view;
  9.  
  10. class pane {
  11. public:
  12.                     pane(RectangleType* in_bounds, view* in_superview);
  13.                     pane(view* in_superview);
  14.                     pane(); // default constructor
  15.     virtual        ~pane();
  16.     
  17.     virtual void        draw(); 
  18.     virtual Boolean    click(int x, int y); 
  19.     virtual Boolean    still_down(int x, int y); 
  20.     virtual Boolean    pen_up(int x, int y); 
  21.     virtual void        idle();
  22.     
  23.     view*        get_superview();
  24.     int            get_width() {return m_bounds.extent.x;};
  25.     int            get_height() {return m_bounds.extent.y;};
  26.     
  27. protected:
  28.     view*                m_superview;
  29.     pane*                m_next_pane;
  30.     RectangleType        m_bounds;
  31.     Boolean                m_visible;
  32.     
  33.     virtual void        draw_self();
  34.     virtual Boolean    click_self(int x, int y);
  35.     virtual Boolean    still_down_self(int x, int y);
  36.     virtual Boolean    pen_up_self(int x, int y);
  37.     virtual void        idle_self();
  38.  
  39. private:
  40.     void                    add_to_master_list();
  41.     void                    remove_from_master_list();
  42. };